#!/bin/sh

# 加载工具类
. /etc/idnewnil/utils.sh

# 配置wifi
PASSWORD=$(getstr '.wifi.password')
uci set wireless.default_radio0.encryption='psk2'
uci set wireless.default_radio0.key=${PASSWORD}
uci del wireless.radio0.disabled
uci del wireless.default_radio0.disabled
uci set wireless.default_radio1.encryption='psk2'
uci set wireless.default_radio1.key=${PASSWORD}
uci del wireless.radio1.disabled
uci del wireless.default_radio1.disabled
uci commit wireless
wifi reload
